#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import re
def test():
    print('Test: 010-12345')
    m = re.match(r'^(\d{3})-(\d{3,8})$','010-12345')
    print('m.group(0)=',m.group(0))
    print('m.group(1)=',m.group(1))
    print('m.group(2)=',m.group(2))

    t = '00:18:49'
    print('Test:',t)
    m = re.match(r'^(0[0-9]|1[0-9]|2[0-3]|[0-9])\:(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]|[0-9])\:(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]|[0-9])$',t)
    print(m.groups())

def is_vaild_email_addr(arg):
    if re.match(r'[\w\.]*\@\w*\.com$',arg):
        return True
    else:
        return False
def split_email_name(arg):
    if is_vaild_email_addr(arg):
        m = re.match(r'([\w\.]*)\@\w*\.com$',arg)
        return m.groups(1)
    else:
        return None
str = input('entry you email address:\n')
print(is_vaild_email_addr(str))
print(split_email_name(str)[0])
